package com.mutual.reins.interf.service.impl;

import com.mutual.reins.interf.entity.ReinsEndorUnit;
import com.mutual.reins.interf.mapper.ReinsEndorUnitMapper;
import com.mutual.reins.interf.service.IReinsEndorUnitService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;

/**
 * <p>
 * 批单数据主表
 服务实现类
 * </p>
 *
 * @author CodeGenerate
 * @since 2021-03-31
 */
@Service
@Transactional(rollbackFor = Exception.class)
public class ReinsEndorUnitServiceImpl extends ServiceImpl<ReinsEndorUnitMapper, ReinsEndorUnit> implements IReinsEndorUnitService {
    @Resource
   private ReinsEndorUnitMapper reinsEndorUnitMapper;
    /**
     * 获取上次批单批单号
     *
     * @param endorNo  批单号
     * @param policyNo 保单号
     * @return 返回上次批单批单号
     */
    @Override
    public String getPreEndorNo(String endorNo, String policyNo) {
        return reinsEndorUnitMapper.getPreEndorNo(endorNo, policyNo);
    }
}
